package com.navinfo.platform.aero.data.rest.core.enumref;

/**
 * @author : LiYang
 * @description: 汇聚粒度
 * @date 2018/5/2    15:56
 */
public enum EnumGather {

    YEAR("year"),

    MONTH("month"),

    WEEK("week"),

    YESTERDAY("yesterday"),

    DAY("day");

    private String name;

    EnumGather(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public static EnumGather getGather(String name) {
        for (EnumGather enumGather : values()) {
            if (enumGather.name.equals(name)) {
                return enumGather;
            }
        }

        return null;
    }
}
